package com.cw.jeeyt.service.intf.api;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cw.jeeyt.common.Order;
import com.cw.jeeyt.service.bo.api.ApiDatabaseScriptConfigBo;
import com.cw.lang.mybatis.dto.PageInfo;

/**
 * 数据库脚本导出配置表业务接口
* @author chenw
* @version 1.0.0
 */
public interface ApiDatabaseScriptConfigService {
    /**
     * 查询所有数据库脚本导出配置表列表信息
     */
    List<ApiDatabaseScriptConfigBo> queryApiDatabaseScriptConfigList() throws Exception;

    /**
     * 删除数据库脚本导出配置表
     *
     * @param apiDatabaseScriptConfigBo
     */
    void delete(ApiDatabaseScriptConfigBo apiDatabaseScriptConfigBo) throws Exception;

    /**
     * 更新数据库脚本导出配置表
     *
     * @param apiDatabaseScriptConfigBo
     */
    void update(ApiDatabaseScriptConfigBo apiDatabaseScriptConfigBo) throws Exception;

    /**
     * 更新数据库脚本导出配置表不为空的字段
     *
     * @param apiDatabaseScriptConfigBo
     */
    void updateSelective(ApiDatabaseScriptConfigBo apiDatabaseScriptConfigBo) throws Exception;

    /**
     * 根据主键查询数据库脚本导出配置表
     *
     * @return
     */
    ApiDatabaseScriptConfigBo getApiDatabaseScriptConfigById(Long id) throws Exception;

    /**
     * 新增数据库脚本导出配置表
     *
     * @param apiDatabaseScriptConfigBo
     * @return
     */
    Integer insert(ApiDatabaseScriptConfigBo apiDatabaseScriptConfigBo) throws Exception;

    /**
     * 新增数据库脚本导出配置表不为空的字段
     *
     * @param apiDatabaseScriptConfigBo
     * @return
     */
    Integer insertSelective(ApiDatabaseScriptConfigBo apiDatabaseScriptConfigBo) throws Exception;

    /**
     * 分页查询数据库脚本导出配置表
     *
     * @param apiDatabaseScriptConfigBo
     * @param startNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    PageInfo<ApiDatabaseScriptConfigBo> queryByPage(ApiDatabaseScriptConfigBo apiDatabaseScriptConfigBo,
        Integer startNum, Integer pageSize, Order order) throws Exception;

    /**
     * 根据数据库id获取数据库脚本配置信息
     *
     * @param databaseId
     * @return
     * @throws Exception
     */
    ApiDatabaseScriptConfigBo getByDatabaseId(Long databaseId) throws Exception;

    /**
     * 导出脚本
     *
     * @param databaseId
     * @param request
     * @param response
     */
    void exportScript(Long databaseId, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 导出Oracle脚本
     *
     * @param databaseId
     * @param request
     * @param response
     */
    void exportOracleScript(Long databaseId, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
